/*
 * lab2.fx
 *
 * Created on 18.12.2009, 16:20:59
 */

package javafx179labs.mikhalin.lab2;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.TextBox;

/**
 * @author Евгений
 */
 var tb: TextBox[] = [];
 var x: String = bind n.text;
 var y = 10;
 var j = 60;
 var c: Node[] =[];

var n = TextBox {
                text: "SampleText"
                selectOnFocus: true
                layoutY: 40
        }


 var b = Button {
                 text: "+"
                 layoutX: 10
                 width: 80
                 layoutY: bind y
                 action: function() {
                 var a: TextBox = TextBox {
                                 layoutY: j
                                 text: x
                                 columns: 12
                                 selectOnFocus: true
                         }
                 insert a into tb;
                 insert a into c;
                 j+=25
                 }
         }
insert b into c;
insert n into c;
insert tb into c;


Stage {
    title: "Application title"
    width: 250
    height: 80
    scene: Scene {
        content: bind c
    }
    }
